/*
 * Copyright (C) 2018, Linaro, Ltd
 * SPDX-License-Identifier: Apache-2.0
 *
 */

#if defined(CONFIG_JWT_SIGN_RSA_PSA) || defined(CONFIG_JWT_SIGN_RSA_LEGACY)

/* To generate the key in the correct format use the following command:
 * $ openssl genrsa 2048 | openssl rsa -outform DER | xxd -i
 */

unsigned char jwt_test_private_der[] = {
	0x30, 0x82, 0x04, 0xa5, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, 0x01, 0x00,
	0xc3, 0x10, 0x4f, 0x09, 0xcb, 0xfa, 0xfc, 0xc6, 0xb3, 0x93, 0x38, 0x00,
	0x6b, 0x0c, 0x6a, 0x68, 0xa8, 0x65, 0x0b, 0xf3, 0x88, 0x57, 0x0f, 0x94,
	0x5c, 0xf0, 0x93, 0xb1, 0x24, 0xff, 0x3e, 0xe8, 0x6b, 0xf3, 0xbd, 0xd1,
	0xd3, 0x9e, 0x64, 0x2e, 0x65, 0xfd, 0x2f, 0x57, 0xe9, 0x8d, 0x12, 0x4b,
	0xae, 0x3f, 0xe5, 0x04, 0x77, 0xa9, 0x78, 0x1f, 0x8a, 0xe8, 0x03, 0x6c,
	0x06, 0x6f, 0x9e, 0x77, 0x5c, 0xfe, 0x87, 0x2a, 0xb3, 0xb7, 0x7f, 0xaa,
	0xe1, 0x9b, 0x2b, 0x79, 0x69, 0xac, 0x06, 0xb3, 0x2e, 0x2f, 0x0d, 0x3a,
	0x99, 0x06, 0xf4, 0xb1, 0x0a, 0x3a, 0x90, 0x75, 0x18, 0x29, 0x48, 0xc4,
	0x2b, 0xd0, 0x67, 0x41, 0x4b, 0x82, 0x47, 0xf3, 0xae, 0x6d, 0x05, 0x37,
	0xe4, 0x4d, 0x7e, 0x19, 0x61, 0x2c, 0xb1, 0x4c, 0x9e, 0x05, 0xcb, 0x98,
	0x7d, 0x1c, 0x92, 0x90, 0xff, 0xef, 0xa0, 0x5c, 0x5d, 0xee, 0xa9, 0xce,
	0x04, 0x8d, 0xbc, 0xea, 0xb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0, 0xce, 0xa0, 0x1f, 0xa7, 0x02, 0x81, 0x81, 0x00, 0xb0, 0x9d, 0xd2,
	0x7f, 0xff, 0xe0, 0x86, 0x3e, 0x5f, 0xfe, 0x83, 0xf6, 0x51, 0xa3, 0x09,
	0xb2, 0xb6, 0x4a, 0xe0, 0xdf, 0xd9, 0xdd, 0x2a, 0x9f, 0x68, 0x4c, 0xb2,
	0x4f, 0x12, 0x1d, 0x07, 0xb8, 0x75, 0x70, 0x28, 0x7a, 0x49, 0xaa, 0x56,
	0x53, 0x7a, 0xc7, 0xbf, 0xbd, 0xea, 0x38, 0x2c, 0xf0, 0x91, 0xf6, 0x71,
	0x1e, 0x97, 0x10, 0x20, 0x79, 0x2b, 0x24, 0x6c, 0x1c, 0x7b, 0x2e, 0x96,
	0x8c, 0x72, 0x13, 0xc1, 0x60, 0x7c, 0x41, 0x20, 0x8b, 0x36, 0x4c, 0xe2,
	0x65, 0x8d, 0xc5, 0x0e, 0x1e, 0x34, 0x01, 0x6d, 0x45, 0x48, 0x86, 0x6e,
	0x45, 0x43, 0xf4, 0xff, 0xb8, 0xa0, 0xa8, 0x07, 0x49, 0x54, 0x92, 0x0f,
	0x53, 0xe9, 0x2c, 0xd3, 0xdb, 0x6a, 0x8a, 0xeb, 0xc4, 0x15, 0x51, 0xdf,
	0x9c, 0x1a, 0x1a, 0x20, 0x8a, 0xed, 0xfe, 0xef, 0xe8, 0xe1, 0x04, 0x14,
	0x05, 0xfd, 0x71, 0xb0, 0x3e
};

#else /* CONFIG_JWT_SIGN_ECDSA_PSA */

/* Here's how to generate the key in the correct format:
 * - generate the key using OpenSSL:
 *   $ openssl ecparam -name prime256v1 -genkey | openssl ec -outform der | xxd -ps
 * - copy the content to https://lapo.it/asn1js/
 * - get the first OCTECT STRING, which is the private key, and copy it here
 */

unsigned char jwt_test_private_der[] = {
	0xAA, 0xE2, 0xA4, 0x5F, 0x3B, 0xC4, 0xCB, 0xA5, 0x0B, 0x17, 0xAE, 0x55,
	0x4D, 0x21, 0x1B, 0xB0, 0xCC, 0x71, 0x42, 0x74, 0xBF, 0x1D, 0xC6, 0x5B,
	0xF9, 0x50, 0x93, 0x06, 0x7B, 0xCE, 0x9D, 0x75
};

#endif

unsigned int jwt_test_private_der_len = sizeof(jwt_test_private_der);
